module.exports = app => {
    const { STRING, TEXT, INTEGER } = app.Sequelize;

    const TopicLessonExam = app.model.define('topic-lesson-exam', {
        userId: {
            type: STRING,
            allowNull: false,
        },
        lessonId: {
            type: INTEGER,
            allowNull: false,
        },
        exams: {
            type: TEXT,
            defaultValue: '',
        },
        answers: {
            type: TEXT,
            defaultValue: '',
        }
    }, {
        timestamps: true,
        underscored: false,
    });

    return TopicLessonExam;
};